1. Field of the Invention
The present invention relates to a motor control apparatus which controls a motor connected to a movable body as a driving source to linearly move the movable body.
2. Description of the Related Art
In a structure which moves a movable body by connecting to a motor, a servo control loop is constituted in which a motor control apparatus generates a position command or a speed command with respect to a rotor of the motor to control the motor, and information about a rotor position and a rotor speed of the motor obtained from an encoder attached to the motor is fed back to the motor control apparatus. The above-described structure includes, for example, a structure in which a motor is connected to a ball screw by a coupling and a table as a movable body is attached to a nut of the ball screw.
In the above-described servo control loop, when a stepwise speed command is given, acceleration at a start of the command will be infinity, and a torque exceeds an allowable torque which is a maximum torque that the motor can output. In addition, rapid acceleration and deceleration gives a large impact to the movable body and causes deterioration in positioning accuracy. Thus, acceleration is limited by acceleration and deceleration processing in an actual command. As described in Atsushi Matsubara, 2008, “Control Engineering For Accurate Positioning and Feed Shaft Design”, pp 98 to 102, Japan, Morikita Publishing Co., Ltd, there are, for example, moving average-type acceleration and deceleration (linear acceleration and deceleration) and two-stage moving average-type acceleration and deceleration (referred to as S-shaped acceleration and deceleration or bell-shaped acceleration and deceleration) as typical acceleration and deceleration processing.
For example, in the moving average-type acceleration and deceleration processing, an arithmetic operation expressed by a formula 1 is executed with respect to an input speed command fin(τ). In the formula 1, a moving average time (primary acceleration and deceleration time) is given as τ1, and a speed command after the moving average-type acceleration and deceleration processing is given as fout(τ).
                                          f            out                    ⁡                      (            t            )                          =                              1                          τ              1                                ⁢                                    ∫                              t                -                                  τ                  ⁢                                                                          ⁢                  1                                            t                        ⁢                                                            f                                      i                    ⁢                                                                                  ⁢                    n                                                  ⁡                                  (                  τ                  )                                            ⁢                                                          ⁢              d              ⁢                                                          ⁢              τ                                                          (        1        )            
However, in the moving average-type acceleration and deceleration processing based on the formula 1, when an acceleration response sufficiently and immediately follows an acceleration command, the acceleration response is generated stepwise which increases an impact on the movable body connected to the motor. In order to avoid generation of the stepwise acceleration response, the two-stage moving average-type acceleration and deceleration is often used. In the two-stage moving average-type acceleration and deceleration processing, an arithmetic operation expressed by a formula 2 is executed with respect to an input speed command fin(τ). In the formula 2, a first stage moving average time (primary acceleration and deceleration time) is given as τ1, a second stage moving average time (secondary acceleration and deceleration time) is given as τ2, and a speed command after the two-stage moving average-type acceleration and deceleration processing is given as fout(τ). In addition, a relationship of τ1>τ2 is satisfied.
                                          f            out                    ⁡                      (            t            )                          =                              1                                          τ                1                            ⁢                              τ                2                                              ⁢                                    ∫                              t                -                                  τ                  ⁢                                                                          ⁢                  2                                            t                        ⁢                                          ∫                                  t                  -                                      τ                    ⁢                                                                                  ⁢                    1                                                  t                            ⁢                                                                    f                                          i                      ⁢                                                                                          ⁢                      n                                                        ⁡                                      (                    τ                    )                                                  ⁢                d                ⁢                                                                  ⁢                                  τ                  2                                                                                        (        2        )            
Simulated waveforms of the two-stage moving average-type acceleration and deceleration processing based on the formula 2 are illustrated in FIG. 5 to FIG. 11. The present simulation uses a model in which a motor is connected to a ball screw by a coupling and a table as a movable body is attached to a nut of the ball screw. A case is considered in which the table is moved to a rising direction (i.e., a direction against the gravity) while assuming that a deceleration distance D of the table as the movable body is 0.4 [m], and a maximum speed VL of the table is 1.33 [m/sec] (=4000 [rpm]/60 [sec/min]*0.02 [m/rev]). In the following descriptions, the deceleration distance D means a deceleration distance when deceleration is started from a current position, and thus, a position obtained by adding the deceleration distance D to the current position is a position of the movable body after deceleration. Usually, the deceleration distance D and the sum of the deceleration distance D and the current position (i.e., the position of the movable body after deceleration) are momentarily calculated, and when the calculated position of the movable body after deceleration reaches a target position, deceleration is started. Further, it is assumed that a maximum rotational frequency NL of the motor is 4000 [rpm], a lead of the ball screw is 0.020 [m/rev], and a rotation-to-linear conversion factor R for converting a motor rotation angle in rotary motion of the motor to a moving distance in linear motion of the movable body is 0.00318 [m/rad] (=0.02/2π). The first stage moving average time τ1 is 160 [msec], and the second stage moving average time τ2 is given as 80 [msec] in the two-stage moving average-type acceleration and deceleration processing. A rotor inertia moment Jm of the motor is given as 0.00179 [kgm2]. An inertia moment Jm of the movable body which is expressed as a total of inertia moments of the table, the ball screw, and the coupling is given as 0.00537 [kgm2]. A friction torque of the movable body linearly moved by the motor is given as 2 [Nm]. A torque for holding gravity received by the movable body (hereinbelow, referred to as “gravity holding torque”) is given as 4 [Nm].
FIG. 5 illustrates a speed command before executing the two-stage moving average-type acceleration and deceleration processing. In FIG. 5, the speed command fin(τ) is expressed as a motor rotational frequency. When a stepwise speed command fin(τ) is given to stop the table moving in the maximum speed VL (i.e., the motor rotates at the maximum rotational frequency NL) at a position of the deceleration distance D=0.4 [m], it takes 300 [msec] to stop as expressed in a formula 3 if the two-stage moving average-type acceleration and deceleration processing is not executed.0.4 [m]÷(0.02/2π)÷4000 [rpm]÷(60/2π)=300 [msec]   (3)
On the other hand, FIG. 6 illustrates a speed command when the two-stage moving average-type acceleration and deceleration processing is executed with respect to the speed command illustrated in FIG. 5. In FIG. 6, a speed command fout(τ) is expressed as a motor rotational frequency. When the two-stage moving average-type acceleration and deceleration processing is executed to the speed command fin(τ) in FIG. 5, the speed command fout(τ) is obtained as illustrated in FIG. 6. FIG. 7 illustrates acceleration of the movable body when the speed command after the two-stage moving average-type acceleration and deceleration processing in FIG. 6 is given, and FIG. 8 illustrates an acceleration change in the acceleration of the movable body in FIG. 7. FIG. 9 illustrates a position of the movable body when the speed command after the two-stage moving average-type acceleration and deceleration processing in FIG. 6 is given. As illustrated in FIG. 9, it takes 540 [msec] to stop the movable body at the position of the deceleration distance D=0.4 [m], and a time length for positioning is longer compared to 300 [msec] when the two-stage moving average-type acceleration and deceleration processing is not executed (FIG. 5).
FIG. 10 illustrates a generation torque when the speed command after the two-stage moving average-type acceleration and deceleration processing in FIG. 6 is given. FIG. 11 illustrates a relationship between rotational frequency and torque when the speed command after the two-stage moving average-type acceleration and deceleration processing in FIG. 6 is given. In FIG. 11, a broken line indicates an allowable torque which is the maximum torque that the motor can output, and a solid line indicates a generation torque when the speed command after the two-stage moving average-type acceleration and deceleration processing is given. As illustrated in FIG. 11, the first stage moving average time τ1 and the second stage moving average time τ2 are set so that a torque of an acceleration end side falls within the allowable torque and is close to the allowable torque as much as possible. The generation torque of an acceleration start side and the generation torque of the acceleration end side are symmetrical, and they will be also symmetrical in a speed-acceleration graph in the acceleration start time and in the acceleration end time, which is not illustrated here. The allowable torque of the motor largely decreases when the motor rotational frequency is high, so that the generation torque of the acceleration start side has a margin with respect to the allowable torque of the motor. As described above, the first stage moving average time τ1 and the second stage moving average time τ2 are set in a manner such that the generation torque of the acceleration end side falls within the allowable torque of the motor, and thus the torque generated during deceleration has a value sufficiently smaller than the allowable torque.
As described above, the two-stage moving average-type acceleration and deceleration processing based on the formula 2 has an advantage of avoiding an impact on the movable body connected to the motor which may be generated in the moving average-type acceleration and deceleration processing based on the formula 1. However, the two-stage moving average-type acceleration and deceleration processing based on the formula 2 is limited by an acceleration and deceleration performance in a high-speed range of the motor, and thus, sufficient acceleration matching with the performance cannot be performed in a low-speed range of the motor. In other words, a fairly large part of the acceleration performance is not utilized in the low-speed range, which causes a disadvantage that an extra time is required for positioning and acceleration and deceleration before and after the positioning.
In contrast, as described in, for example, Japanese Patent No. 3681972, an acceleration and deceleration control method has been proposed in which an acceleration pattern constituted of a point sequence of (speed, acceleration) is set according to an output torque of the motor with respect to four torque waveforms for a moving direction of an axis (motor rotational direction) in acceleration and deceleration. According to the method, a relationship between motor speed and acceleration is set without making the torque of the acceleration start side and the torque of the acceleration end side symmetrical, so that the generation torque of the acceleration start side can be close to the allowable torque, and the acceleration performance in the low-speed range can be efficiently used.
Simulated waveforms when the invention described in Japanese Patent No. 3681972 is applied to the above-described model in which the motor is connected to the ball screw by the coupling and the table as the movable body is attached to the nut of the ball screw are described with reference to FIG. 12A, FIG. 12B and FIG. 13 to FIG. 16. Parameters used for the simulation are the same as those in the simulation described with reference to FIG. 5 to FIG. 11. FIG. 12A is a diagram indicating a relationship between speed and acceleration during acceleration used for the simulation in the invention described in Japanese Patent No. 3681972. FIG. 12B is a diagram indicating a relationship between speed and acceleration during deceleration used for the simulation in the invention described in Japanese Patent No. 3681972. FIG. 13 is a graph illustrating the relationships between speed and acceleration in FIG. 12A and FIG. 12B. In the present simulation, the relationships between speed and acceleration during acceleration and deceleration when the movable body is moved to a plus direction by the motor are set as illustrated in FIG. 12A, FIG. 12B, and FIG. 13, and the speed is linearly interpolated therebetween.
As illustrated in FIG. 12A, FIG. 12B, and FIG. 13, a speed V(t) when the movable body is accelerated at set acceleration A(t) is expressed as a formula 4. A calculation period is given as Δt in the formula 4.V(t)=V(t−1)+A(t)×Δt  (4)
A maximum speed of the movable body is given as Vc. In a motor control apparatus 1, the deceleration distance D required to decelerate from the maximum speed Vc is calculated, and when the movable body reaches a position separated the deceleration distance D from a target stop position, the movable body is decelerated at the acceleration A(t) set as illustrated in FIG. 12A, FIG. 12B, and FIG. 13 and stopped when the speed V(t)=0 is satisfied.
FIG. 14 illustrates a generation torque when the movable body is moved while maintaining the relationship between speed and acceleration in FIG. 12A, FIG. 12B, and FIG. 13. FIG. 15 illustrates a position of the movable body when the movable body is moved while maintaining the relationship between speed and acceleration in FIG. 12A, FIG. 12B, and FIG. 13. As illustrated in FIG. 15, it takes 430 [msec] to stop the movable body at the position of the deceleration distance D=0.4 [m], and the time length for positioning is shorter compared to 540 [msec] when the two-stage moving average-type acceleration and deceleration processing is executed (FIG. 9). FIG. 16 illustrates a relationship between rotational frequency and torque when the movable body is moved while maintaining the relationship between speed and acceleration in FIG. 12A, FIG. 12B, and FIG. 13. As illustrated in FIG. 16, an inclination of the torque of the acceleration end side can be changed in two steps according to the allowable torque of the motor and an acceleration change (jerk) allowed to the movable body (machine), and the torque of the acceleration start side can has an inclination according to the allowable jerk, so that a sufficient torque can be output with respect to a torque that the motor can output. Curves of the torque during acceleration and the torque during deceleration can be matched with each other excepting the beginning and the end which are separated by the allowable jerk, so that a sufficient torque can be output with respect to the torque that the motor can output.
According to the moving average-type acceleration and deceleration processing, when the acceleration response sufficiently and immediately follows the acceleration command, the acceleration is generated stepwise, and there is a problem that an impact on the movable body connected to the motor becomes larger.
According to the two-stage moving average-type acceleration and deceleration, the acceleration performance is not utilized in the low-speed range, and there is a problem that an extra time is required for positioning and acceleration and deceleration before and after the positioning.
According to the invention described in Japanese Patent No. 3681972, the relationship between motor speed and acceleration is set without making the torque of the acceleration start side and the torque of the acceleration end side symmetrical, so that the generation torque of the acceleration start side can be close to the allowable torque, and there is an advantage that the acceleration performance in the low-speed range can be efficiently used. However, acceleration and deceleration patterns need to be set 12 points or more (=3 points or more*4 patterns) for each motion considering that the allowable torque of the motor decreases to the high-speed range, and there is a problem that setting operations are complicated. For example, when the movable body is a shaft which receives a frictional force and gravity, the setting operations will be more complicated depending on a specification of a machine to which the motor control apparatus is applied.